package cn.shyouchi.wuguanjia.android.ui.event.labor;

import android.content.Intent;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import cn.shyouchi.wuguanjia.android.R;
import cn.shyouchi.wuguanjia.android.base.BaseActivity;
import cn.shyouchi.wuguanjia.android.widget.TopBar;

public class EventLaborActivity extends BaseActivity {

    @BindView(R.id.topBar)
    TopBar mTopBar;
    @BindView(R.id.tv_total_name)
    TextView mTvTotalName;
    @BindView(R.id.item_total)
    RelativeLayout mItemTotal;
    @BindView(R.id.tv_person_name)
    TextView mTvPersonName;
    @BindView(R.id.item_person)
    RelativeLayout mItemPerson;

    String projectId;

    @Override
    public int initContentView() {
        return R.layout.activity_event_labor;
    }

    @Override
    public void initInjector() {
        projectId = getIntent().getStringExtra("projectId");
    }

    @Override
    public void initUiAndListener() {
        ButterKnife.bind(this);
        mTopBar.setTitle(getTitle().toString());
        mTopBar.setLeftIcon(R.mipmap.ic_back);
        setSupportActionBar(mTopBar.getToolbar());

    }

    @Override
    protected boolean isApplyStatusBarTranslucency() {
        return false;
    }

    @Override
    protected boolean isApplyStatusBarColor() {
        return true;
    }


    @OnClick({R.id.item_total, R.id.item_person})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.item_total:

                Intent intent = new Intent(mContext, TotalLaborActivity.class);
                intent.putExtra("projectId", projectId);
                startActivity(intent);
                break;
            case R.id.item_person:
                Intent in = new Intent(mContext, PersonLaborActivity.class);
                in.putExtra("projectId", projectId);
                startActivity(in);
                break;
        }
    }
}
